<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String roleId = String.valueOf(request.getSession().getAttribute("roleId"));
%>
<c:set var="path" value="${pageContext.request.contextPath }" />
	<!-- 背景 -->
	<div class="warp">
	</div>
	<!-- 头部 -->
	<div class="top">
		<div class="top-left">
		<img src="${path}/resource/images/logo_white.png" class="float-l"></img>	
		</div>
		<div class="top-right">
		<%if("管理员".equals(roleId)) {%>
		<a href="${path}/monitor/redirect/equipManage"><span class="color-w btn-white btn-left">管理系统</span></a>
		<%} else{ %>
		<a><span class="color-w btn-white btn-left">管理系统</span></a>
		<%} %>
		
		<span class="color-w btn-no margin-r-1">监控系统</span>	
		<span class="color-w btn-white btn-left"><img src="${path}/resource/ysr/images/icon_user.png" class="back-icon"></span><span class="color-w btn-no margin-r-1">admin</span>				
		<span class="color-w btn-all"><a class="color-w" href="${path}/common/redirect/satellite">返回主页 <img src="${path}/resource/ysr/images/back.png" class="back-icon"></a></span>

		</div>
	</div>
	<!-- 左侧下拉列表 -->
	

    <div class="menu-left color-w ">
        
        <dl class="menu-dl ">
            <dt class="font-w5"><a href="${path}/manage/redirect/allEquip/allEquipList" class="color-w"><img src="${path}/resource/images/qbsb.png" class="nav-img img-qbsb">全部设备</a></dt>
            <dd class="first_dd none "></dd>
        </dl>
    
        <dl class="menu-dl">
            <dt id="statistics" data-v="0" class="font-w5 had-icon"><a><img src="${path}/resource/images/fbtj.png" class="nav-img img-fbtj">分布统计<img src="${path}/resource/ysr/images/right.png" class="right-icon "></a></dt>
            <dd class="first_dd none left-dd"><a href="${path}/manage/redirect/statistics/equipModel" class="color-w"><img src="${path}/resource/images/sbxh.png" class="padding-1 img-sbxh">设备型号</a></dd>
            <dd class="none left-dd"><a href="${path}/manage/redirect/statistics/faultCode" class="color-w"><img src="${path}/resource/images/gzdm.png" class="padding-1 img-gzdm ">故障代码</a></dd>
            <dd class="none left-dd"><a href="${path}/manage/redirect/statistics/partsModel" class="color-w"><img src="${path}/resource/images/ljxh.png" class="padding-1 img-ljxh">零件型号</a></dd>
            <dd class="none left-dd"><a href="${path}/manage/redirect/statistics/runTime" class="color-w"><img src="${path}/resource/images/tysj.png" class="padding-1 img-tysj">投运时间</a></dd>
        </dl>
    
        <dl class="menu-dl">
            <dt id="faultInfo" data-v="0" class="font-w5 had-icon"><a><img src="${path}/resource/images/gzxx.png" class="nav-img img-gzxx" >故障信息<img src="${path}/resource/ysr/images/right.png" class="right-icon "></a></dt>
            <dd class="first_dd none left-dd"><a href="${path}/manage/redirect/faultInfo/faultEquip" class="color-w "><img src="${path}/resource/images/gzsb.png" class="padding-1 img-gzsb">故障设备</a></dd>
            <dd class=" none left-dd" ><a href="${path}/manage/redirect/faultInfo/newAdd" class="color-w"><img src="${path}/resource/images/wbxz.png" class="padding-1 img-wbxz">维保新增</a></dd>
        </dl>
    
        <dl class="menu-dl">
            <dt class="font-w5"><a href="${path}/manage/redirect/video/openVideo" class="color-w"><img src="${path}/resource/images/spzs.png" class="nav-img img-spzs">视频展示</a></dt>
            <dd class="first_dd none "></dd>
        </dl>
        <div class="menu-btm">
        	
	    	<p>中车株洲电力机车研究所有限公司<p>
	        <p>2016&nbsp;&nbsp;版权所有</p>
  
        </div>
    </div>
    
	
<script type="text/javascript">
 	$(function(){
 		
 		
 		$("dt").click(function(){
 			
 			
 			
 			 if($(this).attr("data-v")==0){
 				$(this).children("a").children(".right-icon").css("transform", "rotate(90deg)");
 			 	$(this).attr("data-v","1");
 			 	console.log($(this).attr("data-v"));
 			 }
 			 else{
 				$(this).children("a").children(".right-icon").css("transform", "rotate(0deg)");
 				$(this).attr("data-v","0");
 			 }
			 			
 		  var dd=$(this).next('dd');
 		  var dis=dd.css('display');
 		  console.log(dd);
 		  console.log(dis);
		  if(dis=="none"){
		  	  $('dd').slideUp();
		  	  $(this).parent().siblings("dl").children(".had-icon").children("a").children(".right-icon").css("transform", "rotate(0)");	  	
		  	  $(this).parent().siblings("dl").children(".had-icon").attr("data-v","0"); 	  	 
		  };		 
		  $(this).nextAll("dd").slideToggle();
		/*   $("dl").removeClass("dl-active"); */

		  /* $(this).parent('dl').addClass("dl-active"); */
		 
		});
 		
 		if(location.href.indexOf('/manage/redirect/statistics') > 0) {
 			$('#statistics').click();
 		}
 		if(location.href.indexOf('/manage/redirect/faultInfo') > 0) {
 			$('#faultInfo').click();
 		}
 	})
</script>
